<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <#assign base=request.contextPath  />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title></title>
    <link rel="stylesheet" href="../frame/layui/css/layui.css">
    <link rel="stylesheet" href="../frame/static/css/style.css">
    <link rel="icon" href="../frame/static/image/code.png">
    <script type="text/javascript" src="../frame/layui/layui.all.js"></script>
    <script type="text/javascript" src="${base}/js/zhang.js"></script>
    <script type="text/javascript" src="${base}/js/jquery.min.js"></script>
    <style type="text/css">
		.layui-btn-radius{
        			border-radius: 5px;
        		}
		</style>
</head>
<body>
<form class="layui-form" action="">
<input type="hidden" id="peopleId">
   <div style="padding: 20px;">
            <label style="padding: 10px;">金额</label>
            <div class="layui-input-inline">
                <input name="number" id="moeny" lay-verify="required" autocomplete="off" class="layui-input isNull" type="text">
            </div>
   </div>
        <div class="layui-form-item" style="margin-bottom: 0px;">
            <div class="layui-input-block" style="float: right;margin-right: 10px;">
                <button class="layui-btn layui-btn-radius" placeholder="￥" lay-filter="formDemo" type="button" onclick="sbmint()" style="background-color: #0092EF;">确定</button>
            </div>
        </div>

    </div>
</form>

<script>
layui.use(['form','layer'], function(){
  var form = layui.form
  ,layer = layui.layer;

})
  function sbmint(){
//  alert($("#peopleId").val())
 // alert($("#moeny").val())

      $.ajax({
          type:"POST",
          data:{"peopleId":$("#peopleId").val(),"moeny":$("#moeny").val()},
          url:"${base}/comPeople/assing",
            success : function(data){
                layer.msg(data);
  setTimeout(function(){
     var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
            parent.layer.close(index); //再执行关闭
  },600)
     var table = parent.layui.table;
                //表刷新方法
                table.reload('testReload', {
                    url: '${base}/comPeople/selectpeople'
                    ,where: {} //设定异步数据接口的额外参数
                });

            }
      });
   }


</script>
</body>
</html>
